﻿<?xml version="1.0" encoding="utf-8" ?>
<json targetNamespace="XbmcConnect">

  <serviceInterfaces>

    <serviceInterface name="Player">

      <method name="GetActivePlayers" path="Player.GetActivePlayers">
        <results>
          <result name="video" dataType="bool"/>
          <result name="audio" dataType="bool"/>
          <result name="picture" dataType="bool"/>
        </results>
      </method>

    </serviceInterface>

    <serviceInterface name="AudioPlayer">

      <method name="State" path="AudioPlayer.State">
        <results>
          <result name="playing" dataType="bool"/>
          <result name="paused" dataType="bool"/>
          <result name="partymode" dataType="bool"/>
        </results>
      </method>

      <method name="PlayPause" path="AudioPlayer.PlayPause">
        <results>
          <result name="playing" dataType="bool"/>
          <result name="paused" dataType="bool"/>
        </results>
      </method>

      <method name="Stop" path="AudioPlayer.Stop"/>
      <method name="SkipPrevious" path="AudioPlayer.SkipPrevious"/>
      <method name="SkipNext" path="AudioPlayer.SkipNext "/>
      <method name="BigSkipBackward" path="AudioPlayer.BigSkipBackward"/>
      <method name="BigSkipForward" path="AudioPlayer.BigSkipForward"/>
      <method name="SmallSkipBackward" path="AudioPlayer.SmallSkipBackward"/>
      <method name="SmallSkipForward" path="AudioPlayer.SmallSkipForward"/>
      <method name="Rewind" path="AudioPlayer.Rewind"/>
      <method name="Forward" path="AudioPlayer.Forward "/>

      <method name="GetTime" path="AudioPlayer.GetTime">
        <results>
          <result name="time" dataType="int"/>
          <result name="total" dataType="int"/>
          <result name="playing" dataType="bool"/>
          <result name="paused" dataType="bool"/>
        </results>
      </method>

      <method name="GetPercentage" path="AudioPlayer.GetPercentage">
        <result dataType="int"/>
      </method>

      <method name="SeekTime" path="AudioPlayer.SeekTime">
        <parameter dataType="int"/>
      </method>

    </serviceInterface>

    <serviceInterface name="AudioLibrary">

      <method name="GetArtists" path="AudioLibrary.GetArtists"/>
      <method name="ScanForContent" path="AudioLibrary.ScanForContent"/>
      
    </serviceInterface>

    <serviceInterface name="VideoLibrary">

      <method name="GetMovies" path="VideoLibrary.GetMovies">
        <parameters>
          <parameter name="fields" dataType="string" />
          <parameter name="sortmethod" dataType="string" />
          <parameter name="sortorder" dataType="string" />
          <parameter name="start" dataType="int" />
          <parameter name="end" dataType="int" />
        </parameters>
        <results>
          <result name="start" dataType="int"/>
          <result name="end" dataType="int"/>
          <result name="total" dataType="int"/>
          <result name="movies" dataType="Movie[]"/>
        </results>
      </method>

      <method name="GetRecentlyAddedMovies" path="VideoLibrary.GetRecentlyAddedMovies">
        <parameters>
          <parameter name="fields" dataType="string" />
          <parameter name="sortmethod" dataType="string" />
          <parameter name="sortorder" dataType="string" />
          <parameter name="start" dataType="int" />
          <parameter name="end" dataType="int" />
        </parameters>
        <results>
          <result name="start" dataType="int"/>
          <result name="end" dataType="int"/>
          <result name="total" dataType="int"/>
          <result name="movies" dataType="Movie[]"/>
        </results>
      </method>

      <method name="ScanForContent" path="VideoLibrary.ScanForContent"/>

    </serviceInterface>

    <serviceInterface name="XbmcSystem">
      <method name="Shutdown" path="System.Shutdown"/>
      <method name="Suspend" path="System.Suspend"/>
      <method name="Hibernate" path="System.Hibernate"/>
      <method name="Reboot" path="System.Reboot"/>
      <method name="Quit" path="XBMC.Quit"/>
      <method name="Introspect" path="JSONRPC.Introspect"/>
      <method name="Version" path="JSONRPC.Version">
        <results>
          <result name="version" dataType="int"/>
        </results>
      </method>
      
      <method name="GetVolume" path="XBMC.GetVolume">
        <result dataType="int"/>
      </method>

      <method name="SetVolume" path="XBMC.SetVolume">
        <parameter dataType="int"/>
      </method>
      
      <method name="Ping" path="JSONRPC.Ping">
        <result dataType="string"/>
      </method>
    </serviceInterface>
    
  </serviceInterfaces>
</json>